<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>APP开发者平台</title>

    <!-- Bootstrap -->
    <link href="/AppInfoSystem/statics/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="/AppInfoSystem/statics/css/font-awesome.min.css" rel="stylesheet">
    <!-- NProgress -->
    <link href="/AppInfoSystem/statics/css/nprogress.css" rel="stylesheet">
    <!-- iCheck -->
    <link href="/AppInfoSystem/statics/css/green.css" rel="stylesheet">
    <!-- bootstrap-progressbar -->
    <link href="/AppInfoSystem/statics/css/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet">
    <!-- JQVMap -->
    <link href="/AppInfoSystem/statics/css/jqvmap.min.css" rel="stylesheet" />
    <link href="/AppInfoSystem/statics/css/dropzone.min.css" rel="stylesheet">
    <!-- Custom Theme Style -->
    <link href="/AppInfoSystem/statics/css/custom.min.css"	rel="stylesheet">

    <!-- add localcss 2016-8-18 -->
    <link href='/AppInfoSystem/statics/localcss/appinfoadd.css' rel='stylesheet'>
    <link href='/AppInfoSystem/statics/localcss/appinfolist.css' rel='stylesheet'>
</head>

<body class="nav-md footer_fixed">
<div class="container body">
    <div class="main_container">
        <div th:replace="~{common/header :: headDiv}"></div>

        <!-- /top navigation -->
        <div class="right_col" role="main">
            <div class="">

                <div class="clearfix"></div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="x_panel">
                            <div class="x_title">
                                <h2>
                                    APP 信息管理维护 <i class="fa fa-user"></i><small>测试账户001
                                    - 您可以通过搜索或者其他的筛选项对APP的信息进行修改、删除等管理操作。^_^</small>
                                </h2>
                                <div class="clearfix"></div>
                            </div>
                            <div class="x_content">
                                <form method="post" th:action="@{/developer/appinfolist}">
                                    <!--通过隐藏框传递页码 -->
                                    <input type="hidden" name="pageIndex" value="1" />

                                    <ul>
                                        <li>
                                            <div class="form-group">
                                                <label class="control-label col-md-3 col-sm-3 col-xs-12">软件名称</label>
                                                <div class="col-md-6 col-sm-6 col-xs-12">
                                                    <input name="querySoftwareName" type="text" class="form-control col-md-7 col-xs-12" value="${param.querySoftwareName}">
                                                </div>
                                            </div>
                                        </li>

                                        <li>
                                            <div class="form-group">
                                                <label class="control-label col-md-3 col-sm-3 col-xs-12">APP状态</label>
                                                <div class="col-md-6 col-sm-6 col-xs-12">
                                                    <select name="queryStatus" class="form-control">
                                                        <option value="">--请选择--</option>
                                                        <option th:each="status : ${statusList}"  th:value="${status.valueId}" th:selected="${status.valueId} == ${#request.getParameter('queryStatus')}">[[${status.valueName}]]</option>

                                                    </select>
                                                </div>
                                            </div>
                                        </li>
                                        <li>
                                            <div class="form-group">
                                                <label class="control-label col-md-3 col-sm-3 col-xs-12">所属平台</label>
                                                <div class="col-md-6 col-sm-6 col-xs-12">
                                                    <select name="queryFlatformId" class="form-control">
                                                        <option value="">--请选择--</option>
                                                        <option th:each="flatform : ${flatformList}" th:value="${flatform.valueId}" th:selected="${flatform.valueId == ${#request.getParameter('queryFlatformId')}}">[[${flatform.valueName}]]</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </li>
                                        <li>
                                            <div class="form-group">
                                                <label class="control-label col-md-3 col-sm-3 col-xs-12">一级分类</label>
                                                <div class="col-md-6 col-sm-6 col-xs-12">
                                                    <select id="queryCategoryLevel1" name="queryCategoryLevel1" class="form-control">
                                                        <option value="">--请选择--</option>
                                                        <option th:each="cate : ${cateList1}"  th:value="${cate.id}" th:selected="${cate.id} == ${#request.getParameter('queryCategoryLevel1')}">[[${cate.categoryName}]]</option>

                                                    </select>
                                                </div>
                                            </div>
                                        </li>
                                        <li>
                                            <div class="form-group">
                                                <label class="control-label col-md-3 col-sm-3 col-xs-12">二级分类</label>
                                                <div class="col-md-6 col-sm-6 col-xs-12">
                                                    <select name="queryCategoryLevel2" id="queryCategoryLevel2" class="form-control">

                                                    </select>
                                                </div>
                                            </div>
                                        </li>
                                        <li>
                                            <div class="form-group">
                                                <label class="control-label col-md-3 col-sm-3 col-xs-12">三级分类</label>
                                                <div class="col-md-6 col-sm-6 col-xs-12">
                                                    <select name="queryCategoryLevel3" id="queryCategoryLevel3" class="form-control">

                                                    </select>
                                                </div>
                                            </div>
                                        </li>
                                        <li><button type="submit" class="btn btn-primary"> 查 &nbsp;&nbsp;&nbsp;&nbsp;询 </button></li>
                                    </ul>
                                </form>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <div class="x_panel">
                            <div class="x_content">
                                <p class="text-muted font-13 m-b-30"></p>
                                <div id="datatable-responsive_wrapper"
                                     class="dataTables_wrapper form-inline dt-bootstrap no-footer">
                                    <div class="row">
                                        <div class="col-sm-12">
                                            <a href="${pageContext.request.contextPath}/developer/toAdd" class="btn btn-success btn-sm">新增APP基础信息</a>
                                            <table id="datatable-responsive" class="table table-striped table-bordered dt-responsive nowrap dataTable no-footer dtr-inline collapsed"
                                                   cellspacing="0" width="100%" role="grid" aria-describedby="datatable-responsive_info" style="width: 100%;">
                                                <thead>
                                                <tr role="row">
                                                    <th class="sorting_asc" tabindex="0"
                                                        aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                                        aria-label="First name: activate to sort column descending"
                                                        aria-sort="ascending">软件名称</th>
                                                    <th class="sorting" tabindex="0"
                                                        aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                                        aria-label="Last name: activate to sort column ascending">
                                                        APK名称</th>
                                                    <th class="sorting" tabindex="0"
                                                        aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                                        aria-label="Last name: activate to sort column ascending">
                                                        软件大小(单位:M)</th>
                                                    <th class="sorting" tabindex="0"
                                                        aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                                        aria-label="Last name: activate to sort column ascending">
                                                        所属平台</th>
                                                    <th class="sorting" tabindex="0"
                                                        aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                                        aria-label="Last name: activate to sort column ascending">
                                                        所属分类(一级分类、二级分类、三级分类)</th>
                                                    <th class="sorting" tabindex="0"
                                                        aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                                        aria-label="Last name: activate to sort column ascending">
                                                        状态</th>
                                                    <th class="sorting" tabindex="0"
                                                        aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                                        aria-label="Last name: activate to sort column ascending">
                                                        下载次数</th>
                                                    <th class="sorting" tabindex="0"
                                                        aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                                        aria-label="Last name: activate to sort column ascending">
                                                        最新版本号</th>
                                                    <th class="sorting" tabindex="0"
                                                        aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                                        style="width: 124px;"
                                                        aria-label="Last name: activate to sort column ascending">
                                                        操作</th>
                                                </tr>
                                                </thead>
                                                <tbody>
                                                  <tr th:each="app : ${pageInfo.list}" role="row" class="odd">
                                                    <td tabindex="0" class="sorting_1">[[${app.softwareName}]]</td>
                                                    <td>[[${app.apkName}]]</td>
                                                    <td>[[${app.softwareSize}]]</td>
                                                    <td>[[${app.flatformName}]]</td>
                                                    <td>[[${app.categoryLevel1Name}]] -> [[${app.categoryLevel2Name}]] -> [[${app.categoryLevel3Name}]]</td>
                                                    <td><span id="appInfoStatus67">[[${app.statusName}]]</span></td>
                                                    <td>[[${app.downloads}]]</td>
                                                    <td>[[${app.versionName}]]</td>
                                                    <td>
                                                        <div class="btn-group">
                                                            <button type="button" class="btn btn-danger">点击操作</button>
                                                            <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                                                                <span class="caret"></span>
                                                                <span class="sr-only">Toggle Dropdown</span>
                                                            </button>
                                                            <ul class="dropdown-menu" role="menu">
                                                                <li>
                                                                </li>
                                                                <li><a class="addVersion" appinfoid="67" data-toggle="tooltip" data-placement="top" title="" data-original-title="新增APP版本信息">新增版本</a>
                                                                </li>
                                                                <li><a class="modifyVersion"
                                                                       appinfoid="67" versionid="" status="1"
                                                                       statusname="待审核"
                                                                       data-toggle="tooltip" data-placement="top" title="" data-original-title="修改APP最新版本信息">修改版本</a>
                                                                </li>
                                                                <li><a  class="modifyAppInfo"
                                                                        appinfoid="67" status="1" statusname="待审核"
                                                                        data-toggle="tooltip" data-placement="top" title="" data-original-title="修改APP基础信息">修改</a></li>
                                                                <li><a  class="viewApp" appinfoid=67  data-toggle="tooltip" data-placement="top" title="" data-original-title="查看APP基础信息以及全部版本信息">查看</a></li>
                                                                <li><a  class="deleteApp" appinfoid=67  appsoftwarename=1_重力锁屏:Gravity Screen Off Pro data-toggle="tooltip" data-placement="top" title="" data-original-title="删除APP基础信息以及全部版本信息">删除</a></li>
                                                            </ul>
                                                        </div>
                                                    </td>
                                                </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-5">
                                            <div class="dataTables_info" id="datatable-responsive_info" role="status" aria-live="polite">
                                                共${pageInfo.total}条记录
                                                ${pageInfo.pageNum}/${pageInfo.Pages}页
                                            </div>
                                        </div>
                                        <div class="col-sm-7">
                                            <div class="dataTables_paginate paging_simple_numbers"
                                                 id="datatable-responsive_paginate">
                                                <ul class="pagination">
                                                        <li class="paginate_button " th:if="!${pageInfo.isFirstPage}">
                                                            <a  href="javascript:page_nav(document.forms[0],1);"
                                                                aria-controls="datatable-responsive"
                                                                tabindex="0">首页</a>
                                                        </li>
                                                        <li class="paginate_button " th:if="!${pageInfo.hasPreviousPage}">
                                                            <a  href="javascript:page_nav(document.forms[0],${pageInfo.prevPageId});"
                                                                aria-controls="datatable-responsive"
                                                                tabindex="0">上一页</a>
                                                        </li>


                                                        <li class="paginate_button " th:if="${pageInfo.hasNextPage}">
                                                            <a  href="javascript:page_nav(document.forms[0],${pageInfo.nextPageId});"
                                                                aria-controls="datatable-responsive" data-dt-idx="1"
                                                                tabindex="0">下一页</a>
                                                        </li>
                                                        <li class="paginate_button next" th:if="!${pageInfo.isLastPage}">
                                                            <a  href="javascript:page_nav(document.forms[0],${pageInfo.totalPages});"
                                                                aria-controls="datatable-responsive" data-dt-idx="7"
                                                                tabindex="0">最后一页</a>
                                                        </li>


                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- footer content -->
        <footer>
            <div class="pull-right">©2016 All Rights Reserved.</div>
            <div class="clearfix"></div>
        </footer>
        <!-- /footer content -->
    </div>
</div>
<div th:replace="~{common/footer :: footDiv}"></div>
<%@ include file="common/footer.html"%>
</body>
</html>
<script src="/AppInfoSystem/statics/localjs/rollpage.js"></script>
<script src="/AppInfoSystem/statics/localjs/appinfolist.js"></script>
<script type="text/javascript">
     $(function () {
         //当网页加载完毕需加载二级分类
         showCategoryLevel2('[[${param.queryCategoryLevel2}]]');
         //当网页加载完毕需加载三级分类
         showCategoryLevel3('[[${param.queryCategoryLevel3}]]');
     });
</script>
